\(\int \cos (\log (6+3 x)) \, dx\) [103]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 7, antiderivative size = 29 \[ \int \cos (\log (6+3 x)) \, dx=\frac {1}{2} (2+x) \cos (\log (3 (2+x)))+\frac {1}{2} (2+x) \sin (\log (3 (2+x))) \]

[Out]

1/2*(2+x)*cos(ln(6+3*x))+1/2*(2+x)*sin(ln(6+3*x))

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4564} \[ \int \cos (\log (6+3 x)) \, dx=\frac {1}{2} (x+2) \sin (\log (3 (x+2)))+\frac {1}{2} (x+2) \cos (\log (3 (x+2))) \]

[In]

Int[Cos[Log[6 + 3*x]],x]

[Out]

((2 + x)*Cos[Log[3*(2 + x)]])/2 + ((2 + x)*Sin[Log[3*(2 + x)]])/2

Rule 4564

Int[Cos[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(d_.)], x_Symbol] :> Simp[x*(Cos[d*(a + b*Log[c*x^n])]/(b^2*d^2*
n^2 + 1)), x] + Simp[b*d*n*x*(Sin[d*(a + b*Log[c*x^n])]/(b^2*d^2*n^2 + 1)), x] /; FreeQ[{a, b, c, d, n}, x] &&
 NeQ[b^2*d^2*n^2 + 1, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{3} \text {Subst}(\int \cos (\log (x)) \, dx,x,6+3 x) \\ & = \frac {1}{2} (2+x) \cos (\log (3 (2+x)))+\frac {1}{2} (2+x) \sin (\log (3 (2+x))) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.76 \[ \int \cos (\log (6+3 x)) \, dx=\frac {1}{2} (2+x) (\cos (\log (3 (2+x)))+\sin (\log (3 (2+x)))) \]

[In]

Integrate[Cos[Log[6 + 3*x]],x]

[Out]

((2 + x)*(Cos[Log[3*(2 + x)]] + Sin[Log[3*(2 + x)]]))/2

Maple [A] (verified)

Time = 0.81 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.03

method result size
default \(\frac {\cos \left (\ln \left (6+3 x \right )\right ) \left (6+3 x \right )}{6}+\frac {\left (6+3 x \right ) \sin \left (\ln \left (6+3 x \right )\right )}{6}\) \(30\)
risch \(\left (\frac {1}{4}-\frac {i}{4}\right ) \left (2+x \right ) \left (6+3 x \right )^{i}+\left (\frac {1}{4}+\frac {i}{4}\right ) \left (2+x \right ) \left (6+3 x \right )^{-i}\) \(34\)
parallelrisch \(\frac {2 x \tan \left (\ln \left (\sqrt {6+3 x}\right )\right )-\tan \left (\ln \left (\sqrt {6+3 x}\right )\right )^{2} x +2 \tan \left (\ln \left (\sqrt {6+3 x}\right )\right )^{2}+4 \tan \left (\ln \left (\sqrt {6+3 x}\right )\right )+x +6}{2 \tan \left (\ln \left (\sqrt {6+3 x}\right )\right )^{2}+2}\) \(72\)

[In]

int(cos(ln(6+3*x)),x,method=_RETURNVERBOSE)

[Out]

1/6*cos(ln(6+3*x))*(6+3*x)+1/6*(6+3*x)*sin(ln(6+3*x))

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.86 \[ \int \cos (\log (6+3 x)) \, dx=\frac {1}{2} \, {\left (x + 2\right )} \cos \left (\log \left (3 \, x + 6\right )\right ) + \frac {1}{2} \, {\left (x + 2\right )} \sin \left (\log \left (3 \, x + 6\right )\right ) \]

[In]

integrate(cos(log(6+3*x)),x, algorithm="fricas")

[Out]

1/2*(x + 2)*cos(log(3*x + 6)) + 1/2*(x + 2)*sin(log(3*x + 6))

Sympy [F]

\[ \int \cos (\log (6+3 x)) \, dx=\int \cos {\left (\log {\left (3 x + 6 \right )} \right )}\, dx \]

[In]

integrate(cos(ln(6+3*x)),x)

[Out]

Integral(cos(log(3*x + 6)), x)

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.69 \[ \int \cos (\log (6+3 x)) \, dx=\frac {1}{2} \, {\left (x + 2\right )} {\left (\cos \left (\log \left (3 \, x + 6\right )\right ) + \sin \left (\log \left (3 \, x + 6\right )\right )\right )} \]

[In]

integrate(cos(log(6+3*x)),x, algorithm="maxima")

[Out]

1/2*(x + 2)*(cos(log(3*x + 6)) + sin(log(3*x + 6)))

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.86 \[ \int \cos (\log (6+3 x)) \, dx=\frac {1}{2} \, {\left (x + 2\right )} \cos \left (\log \left (3 \, x + 6\right )\right ) + \frac {1}{2} \, {\left (x + 2\right )} \sin \left (\log \left (3 \, x + 6\right )\right ) \]

[In]

integrate(cos(log(6+3*x)),x, algorithm="giac")

[Out]

1/2*(x + 2)*cos(log(3*x + 6)) + 1/2*(x + 2)*sin(log(3*x + 6))

Mupad [B] (verification not implemented)

Time = 25.67 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.72 \[ \int \cos (\log (6+3 x)) \, dx=\frac {\sqrt {2}\,\sin \left (\frac {\pi }{4}+\ln \left (3\,x+6\right )\right )\,\left (3\,x+6\right )}{6} \]

[In]

int(cos(log(3*x + 6)),x)

[Out]

(2^(1/2)*sin(pi/4 + log(3*x + 6))*(3*x + 6))/6